home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form w_tabs_demo
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Dialog
- Caption = "ctTABS (Page Tabs) Demo"
- ClientHeight = 5250
- ClientLeft = 1815
- ClientTop = 2085
- ClientWidth = 7725
- Height = 5655
- Icon = "ct_tabs.frx":0000
- Left = 1755
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 5250
- ScaleWidth = 7725
- ShowInTaskbar = 0 'False
- Top = 1740
- Width = 7845
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- Height = 375
- Left = 6420
- TabIndex = 5
- Top = 4770
- Width = 1035
- End
- Begin VB.HScrollBar scrBar
- Height = 285
- Left = 4800
- Max = 11
- Min = 1
- TabIndex = 3
- Top = 4140
- Value = 1
- Width = 2055
- End
- Begin VB.Label lbl_cap
- Caption = "A-B"
- BeginProperty Font
- name = "Times New Roman"
- charset = 0
- weight = 400
- size = 21.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 465
- Left = 5940
- TabIndex = 14
- Top = 1350
- Width = 975
- End
- Begin VB.Label Label8
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 5280
- TabIndex = 13
- Top = 3330
- Width = 1395
- End
- Begin VB.Label Label7
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 900
- TabIndex = 12
- Top = 3330
- Width = 4395
- End
- Begin VB.Label Label6
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 5280
- TabIndex = 11
- Top = 2970
- Width = 1395
- End
- Begin VB.Label Label5
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 900
- TabIndex = 10
- Top = 2970
- Width = 4395
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 5280
- TabIndex = 9
- Top = 2610
- Width = 1395
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 5280
- TabIndex = 8
- Top = 2250
- Width = 1395
- End
- Begin VB.Label Label3
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 900
- TabIndex = 7
- Top = 2610
- Width = 4395
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Height = 375
- Left = 900
- TabIndex = 6
- Top = 2250
- Width = 4395
- End
- Begin VB.Label LabelBottom
- Caption = "Click on the tabs or scroll bar to change the directory."
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 285
- Left = 900
- TabIndex = 4
- Top = 4680
- Width = 4695
- End
- Begin TabsLib.ctTabs ct_Tabs
- Height = 285
- Left = 780
- TabIndex = 2
- Top = 4140
- Width = 4035
- _version = 65536
- _extentx = 7117
- _extenty = 503
- _stockprops = 70
- caption = "A-B;C-D;E-F;G-H;I-K;L-M;N-O;P-R;S-T;U-V;W-Z"
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- amount = 11
- distanceapart = 44
- tabwidth = 55
- selectedstyle = 0
- backcolor = 12632256
- tabcolor = 14745599
- tabbackcolor = 14745599
- tabtextcolor = 0
- threed = -1 'True
- BeginProperty selectedfont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Label LabelDir
- Caption = "Telephone Directory"
- BeginProperty Font
- name = "Times New Roman"
- charset = 0
- weight = 400
- size = 24
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 555
- Left = 720
- TabIndex = 1
- Top = 1260
- Width = 4515
- End
- Begin VB.Shape Shape1
- BorderWidth = 2
- Height = 3090
- Left = 420
- Shape = 4 'Rounded Rectangle
- Top = 1080
- Width = 6855
- End
- Begin VB.Label Labeltitle
- Alignment = 2 'Center
- Caption = $"ct_tabs.frx":030A
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 465
- Left = 180
- TabIndex = 0
- Top = 270
- Width = 7335
- End
- Attribute VB_Name = "w_tabs_demo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Unload w_tabs_demo
- End Sub
- Private Sub ct_Tabs_DrawTab(nDrawTab As Integer)
- If (nDrawTab = 5 Or nDrawTab = 11) Then
- ct_Tabs.TabTextColor = RGB(128, 128, 128)
- End If
- End Sub
- Private Sub ct_Tabs_TabChange(nNewTab As Integer, nOldTab As Integer)
- scrBar.Value = nNewTab
- Label1.Caption = ""
- Label2.Caption = ""
- Label3.Caption = ""
- Label4.Caption = ""
- Label5.Caption = ""
- Label6.Caption = ""
- label7.Caption = ""
- label8.Caption = ""
- Select Case (nNewTab)
- Case 1
- lbl_cap.Caption = "A-B"
- Label1.Caption = "Abott, Bud"
- Label2.Caption = "840-8338"
- Label3.Caption = "Aaron, Lee"
- Label4.Caption = "744-1233"
- Label5.Caption = "Budinsky, Lou"
- Label6.Caption = "232-4774"
- Case 2
- lbl_cap.Caption = "C-D"
- Label1.Caption = "Crane, Fraser"
- Label2.Caption = "477-5855"
- Label3.Caption = "Dreary, Dave"
- Label4.Caption = "212-4485"
- Case 3
- lbl_cap.Caption = "E-F"
- Label1.Caption = "Errin, Joe"
- Label2.Caption = "222-8338"
- Label3.Caption = "Foley, Axel"
- Label4.Caption = "923-9233"
- Label5.Caption = "Frame, P."
- Label6.Caption = "947-3773"
- Case 4
- lbl_cap.Caption = "G-H"
- Label1.Caption = "Gluck, Craig"
- Label2.Caption = "475-7903"
- Case 5
- lbl_cap.Caption = "I-K"
- Case 6
- lbl_cap.Caption = "L-M"
- Label1.Caption = "Larry, Moe"
- Label2.Caption = "857-4464"
- Label3.Caption = "Manny, May"
- Label4.Caption = "1-844-4833"
- Label5.Caption = "Moriarty, P."
- Label6.Caption = "887-8447"
- Case 7
- lbl_cap.Caption = "N-O"
- Label1.Caption = "Neville, Aaron"
- Label2.Caption = "233-3833"
- Label3.Caption = "Osterman, al"
- Label4.Caption = "888-8838"
- Case 8
- lbl_cap.Caption = "P-R"
- Label1.Caption = "Porter, Cole"
- Label2.Caption = "874-2273"
- Label3.Caption = "Radison, George"
- Label4.Caption = "733-4484"
- Label5.Caption = "Rickson, Bob."
- Label6.Caption = "393-8338"
- Case 9
- lbl_cap.Caption = "S-T"
- Label1.Caption = "Sargeant, Dick"
- Label2.Caption = "744-8555"
- Label3.Caption = "Teller, Pen"
- Label4.Caption = "885-6955"
- Case 10
- lbl_cap.Caption = "U-V"
- Label1.Caption = "Unger, Felix"
- Label2.Caption = "274-1273"
- Case 11
- lbl_cap.Caption = "W-Z"
- End Select
- End Sub
- Private Sub Form_Load()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.15
- End Sub
- Private Sub scrBar_Change()
- Dim Visible As Integer
- Dim Cntr As Integer
- Visible = 6
- If (ct_Tabs.SelectedTab < scrBar.Value) Then
- ct_Tabs.SelectedTab = scrBar.Value
- If (ct_Tabs.SelectedTab - ct_Tabs.Offset > Visible) Then
- ct_Tabs.Offset = ct_Tabs.SelectedTab - Visible
- End If
- Else
- If (ct_Tabs.SelectedTab > scrBar.Value) Then
- ct_Tabs.SelectedTab = scrBar.Value
- If (ct_Tabs.SelectedTab <= ct_Tabs.Offset) Then
- ct_Tabs.Offset = ct_Tabs.SelectedTab - 1
- End If
- End If
- End If
- End Sub
-